package pl.lodz.p.kipme;

import java.util.Date;
import java.util.List;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

import pl.lodz.p.kipme.bo.Category;
import pl.lodz.p.kipme.bo.Order;
import pl.lodz.p.kipme.bo.Product;
import pl.lodz.p.kipme.bo.ProductInfo;
import pl.lodz.p.kipme.bo.ProductType;
import pl.lodz.p.kipme.bo.Transaction;
import pl.lodz.p.kipme.exception.BusinessException;

@WebService
public interface CentralService {

	@WebMethod
	public List<Order> checkWaitingOrders();
	
	@WebMethod
	public void updateOrderState(@WebParam(name = "order") Order order) throws BusinessException;
	
	@WebMethod
	public List<Transaction> getTransactionSummary();
	
    @WebMethod
    public List<ProductInfo> getProductInfo();

    @WebMethod
    public List<Category> getCategoryList();

    @WebMethod
    public List<ProductType> getProductTypeList();
    
    @WebMethod
    public Product getProductByProductCode(@WebParam(name="productCode") String productCode);

    @WebMethod
    public List<Product> getProductsByCategory(@WebParam(name="categoryCode") String categoryCode);

    @WebMethod
    public List<Product> getProductsByType(@WebParam(name="typeCode") String typeCode);
    
    @WebMethod
    public List<Transaction> getTransactions(@WebParam(name="startDate") Date startDate, @WebParam(name="endDate") Date endDate);
    
    @WebMethod
    public List<Transaction> getTransactionsByProductCode(@WebParam(name="productCode") String productCode);
}
